package Base.InterFaceTest;

public class InterFaceTest {
    public static void main(String[] args) {

        System.out.println(FaceTest.Max_Speed);
        System.out.println(FaceTest.Min_Speed);

        final Plane plane = new Plane();
        plane.stop();
        plane.tryTest();

    }

}

interface FaceTest{
    // 定义全局常量
    public static final int Max_Speed = 7900;
    final int Min_Speed = 1;

    // 抽象方法
    public abstract void tryTest();

    void stop();

}

class Plane implements FaceTest{
    /**
     * 接口中一般不叫重写，叫实现
     */
    @Override
    public void tryTest() {
        System.out.println("Try again!");
    }

    @Override
    public void stop() {
        System.out.println("Stop it！");

    }
}

    /**
    * 如果不想重写全部的方法，只能将其改为抽象类
    */
abstract class Plane2 implements FaceTest{
    @Override
    public void tryTest() {
        System.out.println("Try again!");
        }
}
